# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        黄周云  
# Name:         test01
# Description:  例9.1
# Author:       ASUS
# Date:         2019/3/12
#-------------------------------------------------------------------------------


# 自定义异常类
class WarpdriveOverloadException(Exception):
    pass
warpdrive = 12
if warpdrive >=10:
    #抛出自定义异常
    raise WarpdriveOverloadException("曲速引擎已过载，请停止或弹出曲速核心，否则飞船将会爆炸。")




